<!-- <script>
    var a = 0

    if (a > 0) {
        alert('a是大于0的')
    }
    else if (a < 0) {
        alert('a是小于0的')
    }
    else {
        console.log('a的值是0')
    }

</script> -->

<script>
    var a = 1

    switch (a) {
        case 1:
            alert('111')
            break
        case 2:
            alert('222')
            break
        default:
            alert('都不是')

    }

</script>